
//define this constant if you want to use Masonry without the 'mas_' prefix
#define MAS_SHORTHAND

//define this constant if you want to enable auto-boxing for default syntax
#define MAS_SHORTHAND_GLOBALS

#import "PublicBenefitViewController.h"
#import <SVProgressHUD.h>
@interface PublicBenefitViewController ()

@end

@implementation PublicBenefitViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:YES];
    [SVProgressHUD show];
    //设置黑色遮罩
    [SVProgressHUD setDefaultMaskType:SVProgressHUDMaskTypeBlack];
    //设置消失时间
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
        // time-consuming task
        [NSThread sleepForTimeInterval:1];
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD dismiss];
        });
    });
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"公益";
    
    UIWebView *webView = [[UIWebView alloc] init];
    
    //取消数据类型的检测
    [webView setDataDetectorTypes:UIDataDetectorTypeNone];
    
    //1.webview加载
    NSURL *url = [NSURL URLWithString:@"http://202.106.210.115:18080/hyde-pluto-h360/nt/appEntrance.htm"];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    
    [webView loadRequest:request];
    
    [self.view addSubview:webView];
    
    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.leading.bottom.trailing.equalTo(self.view);
        make.top.equalTo(self.view.mas_top);
    }];
}



@end
